package com.teach.dao.impl;

import com.teach.entity.AdminInfo;
import com.teach.dao.AdminInfoDAO;
import com.teach.util.DBUtil;
import com.teach.util.DBUtil.BaseDAOImpl;

import java.sql.SQLException;

public class AdminInfoDAOImpl extends BaseDAOImpl<AdminInfo> implements AdminInfoDAO {

  @Override
  public AdminInfo selectByName(String name) throws SQLException {
    String sql = "select * from admin_info where admin_name=?";
    return DBUtil.selectOne(sql,AdminInfo.class, name);
  }
}
